<template>
  <div id="app">
    <tab></tab>
    <transition name="slide">
      <router-view class="page" :key="$route.fullPath" />
    </transition>
  </div>
</template>
<script>
import tab from './components/tab/tab'
export default {
  components: {
    tab
  },
  created() {
    this.$store.dispatch('getOrders')
  }
}
</script>
<style lang="scss">
* {
  box-sizing: border-box;
}
html,body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  height: 100%;
  position: relative;
}

.page {
  width: 100%;
  height: calc(100% - 60px);
  position: absolute;
  left: 0;
}
.slide-enter-active, .slide-leave-active {
  transition: all .5s;
}

.slide-leave-to {
  left: -100%;
}

.slide-enter {
  left: 100%;
}
</style>
